package game.core.phases 
{
	/**
	 * ...
	 * @author Sulus Ltd.
	 */
	public class StartTurnPhase extends TurnPhase
	{
		
		public function StartTurnPhase() 
		{
			name = "начало хода";
		}
		
		
		override public function Start():void 
		{
			trace("StartTurnPhase phase begins");
			
			
			//назначить текущего игрока
			papa.currentPlayer = papa.players[papa.currentPlayerIdx++];
			if (papa.currentPlayerIdx >= papa.players.length)
			{
				papa.currentPlayerIdx = 0;
			}
			
			//поменять гуи под расу игрока
			papa.world.gui.ShowPlayerPanel(papa.currentPlayer);
			
			//next
			EndPhase();
			
		}
		
		override public function Finish():void 
		{
			trace("StartTurnPhase phase ends");
		}
	}

}